package com.eorchis.module.dataSynchronization.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import com.eorchis.core.annotation.AuditModule;
import com.eorchis.core.basedao.dao.IDaoSupport;
import com.eorchis.core.basedao.entity.IBaseEntity;
import com.eorchis.core.service.impl.AbstractBaseService;
import com.eorchis.core.ui.commond.ICommond;
import com.eorchis.module.dataSynchronization.bean.ClassScopeDept;
import com.eorchis.module.dataSynchronization.bean.ClassSignUpDept;
import com.eorchis.module.dataSynchronization.bean.Department;
import com.eorchis.module.dataSynchronization.bean.DepartmentUser;
import com.eorchis.module.dataSynchronization.bean.TrainingClass;
import com.eorchis.module.dataSynchronization.bean.TrainingClassUser;
import com.eorchis.module.dataSynchronization.bean.User;
import com.eorchis.module.dataSynchronization.bean.UserClassTypeHour;
import com.eorchis.module.dataSynchronization.dao.ISynchroDao;
import com.eorchis.module.dataSynchronization.service.ISynchroService;

@Service(value = "com.eorchis.module.dataSynchronization.service.impl.synchroServiceImpl")
@AuditModule("用户&组织机构信息同步")
public class synchroServiceImpl extends AbstractBaseService implements ISynchroService {

	@Autowired
	@Qualifier("com.eorchis.module.dataSynchronization.dao.impl.synchroDaoImpl")
	private ISynchroDao synchroDao;

	@Override
	public IDaoSupport getDaoSupport() {
		return synchroDao;
	}

	@Override
	public <C extends ICommond> C toCommond(IBaseEntity ibaseentity) {
		return null;
	}

	public void addDepartment(Department dept) {
		synchroDao.addDepartment(dept);
	}

	public void updateDepartment(Department dept) {
		synchroDao.updateDepartment(dept);
	}

	public int addUser(User user) {
		return synchroDao.addUser(user);
	}

	public int updateUser(User user) {
		return synchroDao.updateUser(user);
	}

	public String[] getApplicationKey(String code) {
		return synchroDao.getApplicationKey(code);
	}

	public boolean judgeUser(String... strings) {
		return synchroDao.judgeUser(strings);
	}

	public String getDepartmentId(String... strings) {
		return synchroDao.getDepartmentId(strings);
	}

	public boolean judgeDepartment(String... strings) {
		return synchroDao.judgeDepartment(strings);
	}

	public boolean judgeDepartmentUser(String... strings) {
		return synchroDao.judgeDepartmentUser(strings);
	}

	public void updateDepartmentUser(DepartmentUser deptUser) {
		synchroDao.updateDepartmentUser(deptUser);
	}

	public void addDepartmentUser(DepartmentUser deptUser) {
		synchroDao.addDepartmentUser(deptUser);
	}

	@Override
	public List<User> findUserList(Integer daysBefore) {
		return synchroDao.findUserList(daysBefore);
	}

	@Override
	public List<TrainingClassUser> findTrainingClassUserList(Integer daysBefore) {
		return synchroDao.findTrainingClassUserList(daysBefore);
	}

	@Override
	public List<TrainingClass> findTrainingClassList(Integer daysBefore) {
		return synchroDao.findTrainingClassList(daysBefore);
	}

	@Override
	public List<ClassScopeDept> findClassScopeDeptList(String[] classIds) {
		return synchroDao.findClassScopeDeptList(classIds);
	}

	@Override
	public List<ClassSignUpDept> findClassSignUpDeptList(String[] classIds) {
		return synchroDao.findClassSignUpDeptList(classIds);
	}

	@Override
	public Department findDepartment(Department d) {
		return synchroDao.findDepartment(d);
	}

	@Override
	public DepartmentUser findDepartmentUser(DepartmentUser d) {
		return synchroDao.findDepartmentUser(d);
	}

	@Override
	public UserClassTypeHour findUserClassTypeHour(UserClassTypeHour u) {
		return synchroDao.findUserClassTypeHour(u);
	}

	@Override
	public TrainingClassUser findTrainingClassUser(TrainingClassUser t) {
		return synchroDao.findTrainingClassUser(t);
	}

	@Override
	public TrainingClass findTrainingClass(TrainingClass t) {
		return synchroDao.findTrainingClass(t);
	}

	@Override
	public boolean judgeTrainingClass(String... strings) {
		return synchroDao.judgeTrainingClass(strings);
	}

	@Override
	public void addTrainingClass(TrainingClass trainingClass) {
		synchroDao.addTrainingClass(trainingClass);
	}

	@Override
	public void updateTrainingClass(TrainingClass trainingClass) {
		synchroDao.updateTrainingClass(trainingClass);
	}

	@Override
	public boolean judgeTrainingClassUser(String... strings) {
		return synchroDao.judgeTrainingClassUser(strings);
	}

	@Override
	public void addTrainingClassUser(TrainingClassUser trainingClassUser) {
		synchroDao.addTrainingClassUser(trainingClassUser);
	}

	@Override
	public void updateTrainingClassUser(TrainingClassUser trainingClassUser) {
		synchroDao.updateTrainingClassUser(trainingClassUser);
	}

	@Override
	public boolean judgeUserClassTypeHour(String... strings) {
		return synchroDao.judgeUserClassTypeHour(strings);
	}

	@Override
	public void addUserClassTypeHour(UserClassTypeHour userClassTypeHour) {
		synchroDao.addUserClassTypeHour(userClassTypeHour);
	}

	@Override
	public void updateUserClassTypeHour(UserClassTypeHour userClassTypeHour) {
		synchroDao.updateUserClassTypeHour(userClassTypeHour);
	}

	@Override
	public List<String> findAnnulUserIds() {
		return synchroDao.findAnnulUserIds();
	}

	@Override
	public void deleteAnnulUserByIds(List<String> annulUserIds) {
		synchroDao.deleteAnnulUserByIds(annulUserIds);
	}
}
